from django.urls import path
from rest_framework import routers

from account.views import UserProfileViewSets, static_serve

urlpatterns = [
    path("static/<path:path>", static_serve, {"document_root": "account/static/"}),
]
# + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

router = routers.SimpleRouter()  # 最简单的一个路由
router.register("userprofile", UserProfileViewSets, basename="userprofile")

# 想要被Django认可的话还要加上下面这行代码
urlpatterns += router.urls
